export function flatteningAsyncRouter (asyncRouterMap) {
// 扁平化异步路由表
  let arr = []

  function flatteningFun (router) {
    router.forEach(item => {
      if (item.label !== '') {
        arr.push(item.label)
      }
      if (item.children && item.children.length !== 0) {
        flatteningFun(item.children)
      }
    })
  }

  flatteningFun(asyncRouterMap)
  return arr
}